
<table class="tec-ui-test" style="width: 98%" align="center" border="0" cellpadding="2" cellspacing="0"
	style="border-style:none; margin-top: 2px; font-size:16px;">
	<tr>
		<td colspan="2" align="center">
		<h2>商业发票</h2>
		</td>
	</tr>
	<tr>
		<td>第{[$result.id]}号（{[$result.emp_t]}）</td>
		<td align="right">填单日期：{[$result.createtime|date_format:'%Y-%m-%d']}</td>	
	</tr>	
</table>

<table class="tec-ui-td-normal">
	<tr>
		<td width="20%" align="right">事由：</td>
		<td width="80%" colspan="3">{[$result.name]}</td>
	</tr>
	<tr>
		<td width="20%" align="right">产地：</td>
		<td width="30%">China</td>
		<td width="20%" align="right">货物编码：</td>
		<td width="30%">{[$result.hscode]}</td>
	</tr>
	<tr>
		<td align="right">币种：</td>
		<td>{[$result.currency_t]}</td>
		<td align="right">货运条款：</td>
		<td>{[$result.delivery_t]}</td>
	</tr>
	<tr>
		<td align="right">客户：</td>
		<td colspan="3">{[$result.customer_x->fullname]}<br/>
		地址：{[$result.customer_x->address]} <!-- 网站：{[$result.customer_x->web]} --></td>
	</tr>
	<tr>
		<td align="right">联系人：</td>
		<td id="e_linkman" colspan="3">{[$result.customer_x->contact]} 手机：{[$result.customer_x->mobile]} 电话：{[$result.customer_x->tel]} 传真：{[$result.customer_x->fax]} 电邮：{[$result.customer_x->email]}</td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td id="e_content" colspan="3">{[$result.content]}</td>
	</tr>
</table>

<table style="margin-top: 10px">
	<tr>
		<th width="40">序号</th>
		<th>流水号</th>
		<th>DESCRIPTION OF GOODS</th>
		<th>PROJ.NO.</th>
		<th>PACKAGE</th>
		<th>Quantity</th>		
		<th>Unit Price</th>
		<th>Amount</th>
		
		<th>GROSS WEIGHT</th>
		<th>NET WEIGHT</th>
		<th>DIMENSION</th>
	</tr>
	{[foreach name=outer key=key item=item from=$result.item]} 
	{[assign var="no" value="`$key+1`"]} 
	{[assign var="amount" value="`$item.price*$item.amount`"]} 
	{[assign var="total" value="`$total+$amount`"]} 
	
	{[assign var="t3" value="`$t3+$item.w1`"]}
	{[assign var="t4" value="`$t4+$item.w2`"]}
	 
	{[assign var="t5" value="`$t5+$item.len*$item.ww*$item.hh`"]} 
	<tr align="center" onMouseOver="this.style.backgroundColor='#D2E4FC'" onMouseOut="this.style.backgroundColor=''">
		<td>{[$no]}</td>
		<td>{[$item.id]}</td>
		<td>{[$item.name]}</td>
		<td>{[$item.mold_t]}</td>
		<td>{[$item.package]}</td>
		<td>{[$item.amount|string_float]}</td>
		<td>{[$result.currency]} {[$item.price|money]}</td>
		<td>{[$result.currency]} {[$amount|money]}</td>
		
		<td>{[$item.w1]} KG</td>
		<td>{[$item.w2]} KG</td>
		<td>{[$item.len]}*{[$item.ww]}*{[$item.hh]} CM</td>	
	</tr>
	{[/foreach]}
	<tr align="center" onMouseOver="this.style.backgroundColor='#D2E4FC'" onMouseOut="this.style.backgroundColor=''">
		<td colspan="7" align="center">合计</td>
		<td>{[$result.currency]} {[$total|money]}</td>
		
		<td>{[$t3]} KG</td>
		<td>{[$t4]} KG</td>
		<td>{[$t5/1000000]} CBM</td>
	</tr>
</table>

<script type="text/javascript" src="js/finance/payment/view.js?r={[$smarty.now]}"></script>
